<?php
/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */

get_header(); ?>
<?php 
					$args = array(
                        'posts_per_page'  => 5,
                        'offset'          => 0,
                        'category_name'   => 'novidades',
                        'orderby'         => 'post_date',
                        'order'           => 'DESC',
                        'include'         => '',
                        'exclude'         => '',
                        'meta_key'        => '',
                        'meta_value'      => '',
                        'post_type'       => 'post',
                        'post_mime_type'  => '',
                        'post_parent'     => '',
                        'post_status'     => 'publish',
                        'suppress_filters' => true
                    );
					query_posts($args);
?> 
		<div id="primary">
			<div class="container" role="main" id="page-novidades">
				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<h1 class="entry-title">NOVIDADES</h1>
					<div id="lista-novidades">
					<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
						<div class="entry-content">
							<?php
								if(has_post_thumbnail()){
									echo "<a href=\"".get_permalink()."\" class=\"foto\">";
									the_post_thumbnail( 'thumbnail');
									echo "</a>";
								}
							?>
							<div class="fl">
								<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
								<p>
									<?php echo strip_tags(get_the_excerpt()); ?>
									<a href="<?php the_permalink(); ?>"><span>[Saiba mais]</span></a>
								</p>
							</div>
						</div>
					<?php endwhile;?>
					<?php endif; ?>
					</div>
				</article><!-- #post-<?php the_ID(); ?> -->
				<div class="clear"></div>
			</div><!-- #content -->
		</div><!-- #primary -->
<?php //get_sidebar('page'); ?>
<?php get_template_part('eventos'); ?>
<?php get_footer(); ?>